<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="bb" class="weaver.general.BaseBean"/>
<jsp:useBean id="resourceInfo" class="weaver.hrm.resource.ResourceComInfo"/>
<%
    String xmmc = Util.null2String( request.getParameter( "xmmc" ) );
    int lc = Util.getIntValue( request.getParameter( "lc" ) );
    List<Map<String, String>> mapList1 = new ArrayList<>();
    List<Map<String, String>> mapList2 = new ArrayList<>();
    JSONObject jsonData = new JSONObject();

    String sql2 = "select id,pjfs,zhpfswgz,swbl,jzj,jzjxs,zxplxs,fxplxs from uf_srm_pfgz where lc='" + lc + "' and xm='" + xmmc + "'";
    rs.executeQuery( sql2);
    rs.next();
    String mainid = Util.null2String( rs.getString( "id" ) );
    String pjfs = Util.null2String( rs.getString( "pjfs" ) );
    String zhpfswgz = Util.null2String( rs.getString( "zhpfswgz" ) );
    String swbl = Util.null2String( rs.getString( "swbl" ) );
    String jzj = Util.null2String( rs.getString( "jzj" ) );
    String jzjxs = Util.null2String( rs.getString( "jzjxs" ) );
    String zxplxs = Util.null2String( rs.getString( "zxplxs" ) );
    String fxplxs = Util.null2String( rs.getString( "fxplxs" ) );

    rs1.executeQuery( "select fkfs,jbbl,pfxs from uf_srm_pfgz_dt1 where mainid='" + mainid + "'" );
    while (rs1.next()) {
        Map<String, String> dataMap1 = new HashMap<>();
        String fkfs = Util.null2String( rs1.getString( "fkfs" ) );
        String jbbl = Util.null2String( rs1.getString( "jbbl" ) );
        String pfxs = Util.null2String( rs1.getString( "pfxs" ) );
        dataMap1.put( "fkfs", fkfs );
        dataMap1.put( "jbbl", jbbl );
        dataMap1.put( "pfxs", pfxs );
        mapList1.add( dataMap1 );
    }

    rs1.executeQuery( "select fktj,pfxs from uf_srm_pfgz_dt2 where mainid='" + mainid + "'" );
    while (rs1.next()) {
        Map<String, String> dataMap2 = new HashMap<>();
        String fktj = Util.null2String( rs1.getString( "fktj" ) );
        String pfxs = Util.null2String( rs1.getString( "pfxs" ) );
        dataMap2.put( "fktj", fktj );
        dataMap2.put( "pfxs", pfxs );
        mapList2.add( dataMap2 );

    }
    bb.writeLog( "param1" + mapList1.toArray() );
    bb.writeLog( "param2" + mapList2.toArray() );

    jsonData.put( "flag", true );
    jsonData.put( "pjfs", pjfs );
    jsonData.put( "zhpfswgz", zhpfswgz );
    jsonData.put( "swbl", swbl );
    jsonData.put( "jzj", jzj );
    jsonData.put( "jzjxs", jzjxs );
    jsonData.put( "zxplxs", zxplxs );
    jsonData.put( "fxplxs", fxplxs );
    jsonData.put( "dataList1", mapList1 );
    jsonData.put( "dataList2", mapList2 );

    out.print( jsonData.toJSONString() );
    bb.writeLog( "getXylcspzDtl2_Ajax=" + jsonData.toJSONString() );
%>


